import Layout from 'layout';
import Home from 'routes/Home';
import Login from 'routes/Login';
import Register from 'routes/Register';
import PasswordFind from 'routes/Validation/PasswordFind';
import Message from 'routes/Validation/Message';
import TimeOut from 'routes/Validation/TimeOut';
import Success from 'routes/Validation/Success';
import Email from 'routes/Validation/Email';
import SendEmail from 'routes/Validation/SendEmail';
import ShoppingCart from 'routes/ShoppingCart';
import RegisterSuccess from 'routes/Register/RegisterSuccess';
import ChangeMobile from 'routes/Validation/ChangeMobile';
import BindEmail from 'routes/Validation/BindEmail';
import SetNewPassword from 'routes/Validation/SetNewPassword';
import EmailRemind from 'routes/Validation/EmailRemind';
import AlreadySend from 'routes/Validation/AlreadySend';
import RawMaterial from 'routes/RawMaterial';
import CompanyProfile from 'routes/Centres/CompanyProfile';
import RulesCenter from 'routes/Centres/RulesCenter';
import InformantCenter from 'routes/Centres/InformantCenter';
import InformantSuccess from 'routes/Centres/InformantCenter/Success';
import CommercialTenant from 'routes/CommercialTenant';
import ShopIndex from 'routes/CommercialTenant/ShopIndex';
import ShopIntroduced from 'routes/CommercialTenant/ShopIntroduced';
import ShopQualification from 'routes/CommercialTenant/ShopQualification';
import ShopContact from 'routes/CommercialTenant/ShopContact';
import SpecialOffer from 'routes/CommercialTenant/SpecialOffer';
import ShopSell from 'routes/CommercialTenant/ShopSell';
import CheckoutCounter from 'routes/CheckoutCounter';
import PaymentResult from 'routes/PaymentResult';
import TradingMarketUser from 'routes/TradingMarketUser';
import ConfirmOrder from 'routes/ConfirmOrder';
import ConfirmResult from 'routes/ConfirmResult';
import Notice from 'routes/Notice';
import NoticeDetail from 'routes/Notice/Detail';
import News from 'routes/News';
import Help from 'routes/Help';
import ProductDetails from '../routes/CommercialTenant/ProductDetails';
import ContentPages from 'routes/ContentPages';
import Feedback from 'routes/Feedback';
import FeedbackResult from 'routes/FeedbackResult';
import SearchNews from 'routes/News/SearchNews';
import NewsDetails from 'routes/News/NewsDetails';
import TechnologyNews from 'routes/News/TechnologyNews';
import InternationalNews from 'routes/News/InternationalNews';
import NationalNews from 'routes/News/NationalNews';
import PoliceNews from 'routes/News/PoliceNews';
import LatestNew from 'routes/News/LatestNew';
/**
 * 卖家中心
 */
import Seller from 'routes/Seller';

// 首页
import SellerHome from 'routes/Seller/Home';

// 交易
import Trade from 'routes/Seller/Trade';
import Order from 'routes/Seller/Trade/Order';
import OrderDetails from 'routes/Seller/Trade/Order/Details';
import LogisticsSetting from 'routes/Seller/Trade/Logistics/Setting';
import LogisticsApply from 'routes/Seller/Trade/Logistics/Apply';
import LogisticsSchedule from 'routes/Seller/Trade/Logistics/Schedule';
import LogisticsScheduleDetail from 'routes/Seller/Trade/Logistics/Schedule/Detail';

// 账户
import User from 'routes/Seller/User';
import UserInformation from 'routes/Seller/User/UserInformation';
import AccountInformation from 'routes/Seller/User/AccountInformation';
import AccountCenter from 'routes/Seller/User/AccountCenter';
import AccountSecurity from 'routes/Seller/User/AccountSecurity';

// 店铺
import Shop from 'routes/Seller/Shop';
import CustomGroup from 'routes/Seller/Shop/CustomGroup';

// 商品
import Goods from 'routes/Seller/Goods';
import PhasedTransaction from '../routes/Seller/Trade/PhasedTransaction';
import Estimate from '../routes/Seller/Trade/Estimate';

/** **** END  **** **/


const routes = [
  {
    component: Layout,
    routes: [
      {
        path: '/',
        exact: true,
        component: Home,
      },
      {
        path: '/login',
        component: Login,
      },
      {
        path: '/register',
        component: Register,
      },
      {
        path: '/password-find',
        component: PasswordFind,
      },
      {
        path: '/message',
        component: Message,
      }, {
        path: '/timeout',
        component: TimeOut,
      },
      {
        path: '/success',
        component: Success,
      },
      {
        path: '/email',
        component: Email,
      },
      {
        path: '/send-email',
        component: SendEmail,
      },
      {
        path: '/shopping-cart',
        component: ShoppingCart,
      },
      {
        path: '/register-success',
        component: RegisterSuccess,
      },
      {
        path: '/change-mobile',
        component: ChangeMobile,
      },
      {
        path: '/bind-email',
        component: BindEmail,
      },
      {
        path: '/set-new-password',
        component: SetNewPassword,
      },
      {
        path: '/email-remind',
        component: EmailRemind,
      },
      {
        path: '/already-send',
        component: AlreadySend,
      },
      {
        path: '/raw-material',
        component: RawMaterial,
      },
      {
        path: '/company-profile',
        component: CompanyProfile,
      },
      {
        path: '/rules-center',
        component: RulesCenter,
      },
      {
        path: '/informant-center',
        component: InformantCenter,
      },
      {
        path: '/informant-success',
        component: InformantSuccess,
      },
      {
        path: '/commercial-tenant',
        component: CommercialTenant,
        routes: [
          {
            path: '/commercial-tenant/shop-index',
            component: ShopIndex,
          },
          {
            path: '/commercial-tenant/shop-introduced',
            component: ShopIntroduced,
          },
          {
            path: '/commercial-tenant/shop-qualification',
            component: ShopQualification,
          },
          {
            path: '/commercial-tenant/shop-contact',
            component: ShopContact,
          },
          {
            path: '/commercial-tenant/special-offer',
            component: SpecialOffer,
          },
          {
            path: '/commercial-tenant/shop-sell',
            component: ShopSell,
          },
          {
            path: '/commercial-tenant/product-details',
            component: ProductDetails,
          },
        ],
      },
      {
        path: '/checkout-counter',
        component: CheckoutCounter,
      },
      {
        path: '/payment-result',
        component: PaymentResult,
      },
      {
        path: '/trading-market-user',
        component: TradingMarketUser,
      },
      {
        path: '/confirm-order',
        component: ConfirmOrder,
      },
      {
        path: '/confirm-result',
        component: ConfirmResult,
      },
      {
        path: '/news',
        component: News,
        routes: [
          {
            path: '/news/latestnew',
            component: LatestNew,
          },
          {
            path: '/news/national-news',
            component: NationalNews,
          },
          {
            path: '/news/international-news',
            component: InternationalNews,
          },
          {
            path: '/news/police-news',
            component: PoliceNews,
          },
          {
            path: '/news/technology-news',
            component: TechnologyNews,
          },
        ],
      },
      {
        path: '/news-details',
        component: NewsDetails,
      },
      {
        path: '/help',
        component: Help,
      },
      {
        path: '/feedback',
        component: Feedback,
      },
      {
        path: '/feedback-result',
        component: FeedbackResult,
      },
      {
        path: '/search-news',
        component: SearchNews,
      },
      {
        path: '/notice',
        exact: false,
        component: ContentPages,
        routes: [
          {
            path: '/notice',
            component: Notice,
            routes: [
              {
                path: '/notice/detail',
                component: NoticeDetail,
              },
            ],
          },
        ],
      },
      {
        path: '/seller',
        exact: false,
        component: Seller,
        routes: [
          {
            path: '/seller',
            exact: true,
            component: SellerHome,
          },
          {
            path: '/seller/trade',
            component: Trade,
            routes: [
              {
                path: '/seller/trade/order',
                exact: true,
                component: Order,
              },
              {
                path: '/seller/trade/order/details',
                component: OrderDetails,
              },
              {
                path: '/seller/trade/logistics-setting',
                component: LogisticsSetting,
              },
              {
                path: '/seller/trade/logistics-apply',
                component: LogisticsApply,
              },
              {
                path: '/seller/trade/logistics-schedule',
                component: LogisticsSchedule,
              },
              {
                path: '/seller/trade/logistics-schedule-detail',
                component: LogisticsScheduleDetail,
              },
              {
                path: '/seller/trade/phased-transaction',
                component: PhasedTransaction,
              },
              {
                path: '/seller/trade/estimate',
                component: Estimate,
              },
            ],
          },
          {
            path: '/seller/user',
            component: User,
            routes: [
              {
                path: '/seller/user/user-information',
                exact: true,
                component: UserInformation,
              },
              {
                path: '/seller/user/account-information',
                component: AccountInformation,
              },
              {
                path: '/seller/user/account-center',
                component: AccountCenter,
              },
              {
                path: '/seller/user/account-security',
                component: AccountSecurity,
              },
            ],
          }, {
            path: '/seller/goods',
            component: Goods,
          },
          {
            path: '/seller/shop',
            component: Shop,
            routes: [
              {
                path: '/seller/shop/customgroup',
                component: CustomGroup,
              },
            ],
          },
        ],
      },
    ],
  },
];

export default routes;
